<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no" />
    <title>添加订单</title>
    <link href="${ctx_tbk}css/style.css" rel="stylesheet" />
    <link href="${ctx_tbk}css/swipper.css" rel="stylesheet" />
    <link href="${ctx_tbk}css/preload.css" rel="stylesheet" />
    <link href="${ctx_tbk}css/loading.css" rel="stylesheet" />
    
    <script>
        var deviceWidth = document.documentElement.clientWidth;
        if (deviceWidth > 750) deviceWidth = 750;
        document.documentElement.style.fontSize = deviceWidth / 7.5 + "px";
        document.documentElement.style.width = "100%";
    </script>
</head>
<body>
    <div id="containter" class="container">
        
<div class="ordernav">
        <a href="./order?m=new" class="cur"><span>添加订单</span></a>
            <a href="./order?m=all"><span>全部订单</span></a>
            <a href="./order?m=toret"><span>待返</span></a>
            <a href="./order?m=ret"><span>已返</span></a>
</div>
<div class="addorder">
	
    <input type="text" class="orderid" id="orderno" name="orderno" placeholder="请输入淘宝订单号">
    <div class="flow-button"><input class="flow-btn" id="commit" type="submit" value="确认"></div>
    
    <div class="addtip"><!--a href="/FAQ/Content/4" class="ordercopyhow">如何复制</a--><a href="./index.php?i=3&c=entry&do=index&m=tiger_taoke" class="attikotti">随便逛逛&gt;</a></div>
    <div style="width:100%"><span style="color:#ff0000;padding-left:15px;">*系统订单录入存在一定延迟，请下单后十分钟后再提交</span><img src="${ctx_tbk}img/sd.jpg" width="100%" height="" alt="" /></div>
</div>ac


<%@ include file="footer.jsp" %>

</body>
</html>
<script src="${ctx_tbk}js/jquery-1.7.2.min.js"></script>
<script src="${ctx_tbk}js/tool.js"></script>
<script src="${ctx_tbk}js/asynloading.js"></script>
<script src="${ctx_tbk}js/idangerous.swiper.min.js"></script>
<script src="${ctx_tbk}js/common_phone.js"></script>
<script src="${ctx_tbk}js/user/fun.js"></script>

    <script>
        var swiper2 = new Swiper('.swiper2', {
            slidesPerView: 2.93,
            paginationClickable: true,
            freeMode: true
        });
        $(function () {
            $("#commit").on("click", function () {

                var code = $("#orderno").val();
                if (code == '') {
                    //alert("请输入淘宝订单号");
                    popwindow("订单", "请输入淘宝订单号");
                    $(".popwcomfirm").hide();
                    $(".popwcancel").html("确定");
                    return;
                }
                if(code.match(/^\d{16}$/) == null){
                    popwindow("订单", "亲，订单号为16位的数字哦！");
                    $(".popwcomfirm").hide();
                    $(".popwcancel").html("确定");
                    return;
                }
                $.ajax({
                    type: "post",
                    url: "/order/add",
                    dataType: "json",
                    data: { orderno: code },
                    success: function (data) {
                        if (data.statusCode == "200") {
                            //alert("添加成功");
                            popwindow("订单", "提示：订单复制成功后，平台与第三方购物数据确认后，预计24小时内显示订单内容");
                            $(".popwcomfirm").hide();
                            $(".popwcancel").html("确定");
                        }else{
                            popwindow("订单", "提示："+data.msg);
                            $(".popwcomfirm").hide();
                            $(".popwcancel").html("确定");
                        }
                    }
                });
            });
        });
    </script>
